<table class="table inline-grid people-grid <%= className %> <%= className %>-<%= randomSeed %>">
<thead>
  <tr>
      <th><a data-type="username">Username</a></th>
  </tr>
</thead>
<tbody style="height: 500px; overflow: auto; display:block;">

<% if users.empty? %>
  <tr>
    <td>No matching content.</td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
<% end %>
<% users.each_with_index do |user, index| %>
  <% if index > 9 %>
    <tr class="hide">
  <% else %>
    <tr>
  <% end %>
    <td class="username"><a href="/profile/<%= user.username %>"><%= user.username %></a> <%=user.new_contributor %></td>
  </tr>
<% end %>
</tbody>
</table>
<% if !current_user.nil? %>
  <p><a class="btn btn-primary" href="/profile/tags/create/<%= current_user.id %>?name=<%= tagname %>">Join this group</a></p>
<% else %>
  <p><a class="btn btn-primary disabled" href="">Join this group</a></p>
  <p><a data-toggle="modal" data-target="#loginModal"> Login/Sign up </a> to join. </p>
<% end %>
<script>
(function(){
  setupGridSorters(".<%= className %>-<%= randomSeed %>");
})()
</script>
<style>
  table thead, tbody tr{
    display: table;
    width: 100%;
  }
  a.grid-embed {
    float:right;
    padding:8px;
  }
  a.grid-embed:hover {
    color: #888;
  }
</style>
